package com.shunan.miaosha.result;

public class CodeMsg {
	private int code;
	private String msg;
	
	/**
	 * 服务器端错误
	 */
	public static final CodeMsg SERVER_ERROR=new  CodeMsg(10001,"服务器 异常");
	public static final CodeMsg PARAM_ERROR=new  CodeMsg(10001,"传入参数格式错误");	
	/**
	 * 货物已售空
	 */
	public static final CodeMsg NO_GOODS=new  CodeMsg(20001,"货物已售空");
	public static final CodeMsg REPEATE_MIAOSHA=new  CodeMsg(20002,"重复秒杀");
	/**
	 * 用户不存在
	 */
	public static final CodeMsg NO_USER=new  CodeMsg(30001,"不存在这个用户");

	
	private CodeMsg(int code, String msg){
		this.code=code;
		this.msg=msg;	
	}
	public int getCode() {
		return code;
	}
	public String getMsg() {
		return msg;
	}
}
